package com.ai.entity.made.camera;


import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CameraBO implements Serializable {

    @ApiModelProperty(value = "当前用户ID")
    private Integer currentId;

    @ApiModelProperty(value = "主键,主键ID")
    private Integer id;

    @ApiModelProperty(value = "代号（备用主键）")
    private String code;

    @ApiModelProperty(value = "摄像头名")
    @NotBlank(message = "摄像头名不能为空")
    private String nickname;

    @ApiModelProperty(value = "摄像头帐号")
    private String username;

    @ApiModelProperty(value = "摄像头密码")
    private String password;

    @ApiModelProperty(value = "摄像头IP")
    private String ip;

    @ApiModelProperty(value = "摄像头RTSP地址")
    private String url;

    @ApiModelProperty(value = "状态(1.开，2.关，-1.弃用)")
    private Integer state;

    @ApiModelProperty(value = "服务器ID")
    private Integer serverId;

    @ApiModelProperty(value = "最大功能数量")
    private Integer maxNum;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "端口")
    private String port;

    @ApiModelProperty(value = "取流方式,1rtsp 2天地伟业")
    private Integer streamWay;


    @ApiModelProperty(value = "0:软解码，1：硬解码")
    private Integer switchDecoderType;

    @ApiModelProperty(value = "解码gpu模块选择")
    private Integer checkGpu;

    public static   CameraPO convertBOToPO(CameraBO cameraBO) {
        CameraPO cameraPO = new CameraPO();
        BeanUtils.copyProperties(cameraBO, cameraPO);
        return cameraPO;
    }
}
